package CorpusConverter;

import java.io.IOException;
import java.util.NoSuchElementException;

import CorpusConverter.Corpus;
import TrainingData.TrainingInstanceCollection;

/**
 * @author Robert Pethes
 * 
 * Class for converting a corpus into a TrainingInstanceCollection.
 *
 */
public abstract class CorpusConverter {
		
		protected Corpus _corpus;
		
		/**
		 * Initializes the converter.
		 * 
		 * @param corpus a corpus with training instances.
		 */
		public CorpusConverter(Corpus corpus){
			_corpus = corpus;
		}
		
		/**
		 * Converts the corpus.
		 * 
		 * @return the collection of training instances.
		 * @throws IOException
		 * @throws NoSuchElementException
		 */
		public abstract TrainingInstanceCollection convert() throws IOException, NoSuchElementException ;
}
